import { Notify } from 'vant';

export class Message {
  success(message: string) {
    Notify({ type: 'success', message, onClick: () => Notify.clear() });
  }
  error(message: string) {
    Notify({ type: 'danger', message, onClick: () => Notify.clear() });
  }
  warning(message: string) {
    Notify({ type: 'warning', message, onClick: () => Notify.clear() });
  }
}

export const $message = new Message()
